package com.zzq.mapper;

import com.zzq.Model.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {

    public User getById(int userId);

    public User getByUsername(String username);

    public List<User> getByNickName(String nickName);

    public List<User> getAll();

    public User getByUserNameAndPassword(@Param("username") String username, @Param("password") String password);

    public int deleteByIds(@Param("userIds") List<Integer> userIds);

    public int deleteById(int userId);

    public int add(User user);

    public int editInfo(@Param("userId") int userId, @Param("nickName") String nickName, @Param("email") String email, @Param("phone") String phone, @Param("intro") String intro);

    public int editPermission(@Param("userId") int userId, @Param("permission") int permission);

    public int editPassword(@Param("userId") int userId, @Param("password") String password);

    public int addReadCount(int userId);

    public int editAvatar(@Param("userId") int userId, @Param("avatarPath") String avatarPath);
}